Skip to content

Change use_auth_token to token in TransformersDocumentClassifier#6493

Merged
anakin87 merged 1 commit into
deepset-ai:v1.xfrom
mateoPecina:v1.x
Dec 6, 2023
Merged

Change use_auth_token to token in TransformersDocumentClassifier#6493
anakin87 merged 1 commit into
deepset-ai:v1.xfrom
mateoPecina:v1.x

Conversation

@mateoPecina
Copy link
Copy Markdown

Proposed Changes:

When I tried using the TransformersDocumentClassifier with the task 'text-classification' I always had an error because it used 'use_auth_token' in the creation of the pipeline, instead of 'token'.

How did you test it?

Manual verification on the scrypt it was first intented to use it.

Notes for the reviewer

Checklist

@mateoPecina mateoPecina requested a review from a team as a code owner December 6, 2023 07:26
@mateoPecina mateoPecina requested review from vblagoje and removed request for a team December 6, 2023 07:26
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Dec 6, 2023

CLA assistant check
All committers have signed the CLA.

@anakin87
Copy link
Copy Markdown
Member

anakin87 commented Dec 6, 2023

Hello and thanks for this contribution!

The problem

It was not straightforward to reproduce the problem, so next time I suggest opening an issue with a reproducible example,,,
However, the problem is real. This fails:

from haystack.nodes import TransformersDocumentClassifier
from haystack import Document

docs = [Document(content="I am sad", meta={"name": "doc1"}), Document(content="I am happy", meta={"name": "doc2"})]

doc_classifier = TransformersDocumentClassifier(model_name_or_path="bhadresh-savani/distilbert-base-uncased-emotion")

predictions = doc_classifier.predict(docs)

The current PR

  • It's simple and nice.
  • Once the CLA is signed, I will approve it! 💟

@anakin87 anakin87 self-requested a review December 6, 2023 08:45
@anakin87 anakin87 added the ignore-for-release-notes PRs with this flag won't be included in the release notes. label Dec 6, 2023
@anakin87 anakin87 merged commit 73c3302 into deepset-ai:v1.x Dec 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ignore-for-release-notes PRs with this flag won't be included in the release notes.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants